import Layout from '@/layout';
const meta = {
	auth: true
};
const _import = require('@/utils/util.import.' + process.env.NODE_ENV);

export default {
	path: '/spm',
	component: Layout,
	name: 'spm',
	meta,
	redirect: {
		name: 'spm_log_see'
	},
	children: (pre => [{
			path: '/spm/config_set',
			name: `${pre}config_set`,
			component: _import('modules/spm/config_set.vue'),
			meta: {
				...meta,
				title: '变量配置'
			},
		},
		{
				path: '/spm/action_manager',
				name: `${pre}action_manager`,
				component: _import('modules/spm/action_manager'),
				meta: {
					...meta,
					title: '权限管理'
				},
			},
		{
			path: '/spm/log_see',
			name: `${pre}log_see`,
			component: _import('modules/spm/log_see.vue'),
			meta: {
				...meta,
				title: '日志查看'
			},
		},
		{
			path: '/spm/role_groupmanager',
			name: `${pre}role_groupmanager`,
			component: _import('modules/spm/role_groupmanager'),
			meta: {
				...meta,
				title: '角色组别'
			},
		},
		{
			path: '/spm/user_manager',
			name: `${pre}user_manager`,
			component: _import('modules/spm/user_manager'),
			meta: {
				...meta,
				title: '用户管理'
			},
		},
		{
			path: '/spm/accountbook_manager',
			name: `${pre}accountbook_manager`,
			component: _import('modules/spm/accountbook_manager'),
			meta: {
				...meta,
				title: '账套管理'
			},
		},
		{
			path: '/spm/department_manager',
			name: `${pre}department_manager`,
			component: _import('modules/spm/department_manager'),
			meta: {
				...meta,
				title: '用户部门'
			},
		},
		{
			path: '/spm/power_allocate',
			name: `${pre}power_allocate`,
			component: _import('modules/spm/power_allocate.vue'),
			meta: {
				...meta,
				title: '权限分配'
			},
		},
		{
			path: '/spm/auto_tasks',
			name: `${pre}auto_tasks`,
			component: _import('modules/spm/auto_tasks.vue'),
			meta: {
				...meta,
				title: '自动任务'
			},
		},

	])('spm_')
};
